import * as util from '../common/util.js'

function postFu(url,request,callback) {
	
	util.postFu(url,request, function (data) {
		// console.log(JSON.stringify(url) + ':' + JSON.stringify(data));
		if (data.code == 1) {
			callback(data);
		}else if(data.code == -1){
			uni.removeStorageSync('huashanghui_token')
			uni.reLaunch({
				url:'/pages/index/index'
			})
		}else {
			uni.showToast({
				icon:'none',
				title:data.msg
			})
		}
	});
	
}

export default postFu;